3.8 \(\int \frac{\cot ^4(x)}{a+a \csc (x)} \, dx\)

Optimal. Leaf size=31 \[ \frac{x}{a}+\frac{\tanh ^{-1}(\cos (x))}{2 a}+\frac{\cot (x) (2-\csc (x))}{2 a} \]

[Out]

x/a + ArcTanh[Cos[x]]/(2*a) + (Cot[x]*(2 - Csc[x]))/(2*a)

________________________________________________________________________________________

Rubi [A]  time = 0.0598691, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {3888, 3881, 3770} \[ \frac{x}{a}+\frac{\tanh ^{-1}(\cos (x))}{2 a}+\frac{\cot (x) (2-\csc (x))}{2 a} \]

Antiderivative was successfully verified.

[In]

Int[Cot[x]^4/(a + a*Csc[x]),x]

[Out]

x/a + ArcTanh[Cos[x]]/(2*a) + (Cot[x]*(2 - Csc[x]))/(2*a)

Rule 3888

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[a^(2*n
)/e^(2*n), Int[(e*Cot[c + d*x])^(m + 2*n)/(-a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && E
qQ[a^2 - b^2, 0] && ILtQ[n, 0]

Rule 3881

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[(e*(e*Cot[
c + d*x])^(m - 1)*(a*m + b*(m - 1)*Csc[c + d*x]))/(d*m*(m - 1)), x] - Dist[e^2/m, Int[(e*Cot[c + d*x])^(m - 2)
*(a*m + b*(m - 1)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[m, 1]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\cot ^4(x)}{a+a \csc (x)} \, dx &=\frac{\int \cot ^2(x) (-a+a \csc (x)) \, dx}{a^2}\\ &=\frac{\cot (x) (2-\csc (x))}{2 a}-\frac{\int (-2 a+a \csc (x)) \, dx}{2 a^2}\\ &=\frac{x}{a}+\frac{\cot (x) (2-\csc (x))}{2 a}-\frac{\int \csc (x) \, dx}{2 a}\\ &=\frac{x}{a}+\frac{\tanh ^{-1}(\cos (x))}{2 a}+\frac{\cot (x) (2-\csc (x))}{2 a}\\ \end{align*}

Mathematica [B]  time = 0.0467307, size = 90, normalized size = 2.9 \[ \frac{x}{a}-\frac{\tan \left (\frac{x}{2}\right )}{2 a}+\frac{\cot \left (\frac{x}{2}\right )}{2 a}-\frac{\csc ^2\left (\frac{x}{2}\right )}{8 a}+\frac{\sec ^2\left (\frac{x}{2}\right )}{8 a}-\frac{\log \left (\sin \left (\frac{x}{2}\right )\right )}{2 a}+\frac{\log \left (\cos \left (\frac{x}{2}\right )\right )}{2 a} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[x]^4/(a + a*Csc[x]),x]

[Out]

x/a + Cot[x/2]/(2*a) - Csc[x/2]^2/(8*a) + Log[Cos[x/2]]/(2*a) - Log[Sin[x/2]]/(2*a) + Sec[x/2]^2/(8*a) - Tan[x
/2]/(2*a)

________________________________________________________________________________________

Maple [B]  time = 0.058, size = 64, normalized size = 2.1 \begin{align*}{\frac{1}{8\,a} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}}-{\frac{1}{2\,a}\tan \left ({\frac{x}{2}} \right ) }+2\,{\frac{\arctan \left ( \tan \left ( x/2 \right ) \right ) }{a}}-{\frac{1}{8\,a} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-2}}+{\frac{1}{2\,a} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-1}}-{\frac{1}{2\,a}\ln \left ( \tan \left ({\frac{x}{2}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)^4/(a+a*csc(x)),x)

[Out]

1/8/a*tan(1/2*x)^2-1/2/a*tan(1/2*x)+2/a*arctan(tan(1/2*x))-1/8/a/tan(1/2*x)^2+1/2/a/tan(1/2*x)-1/2/a*ln(tan(1/
2*x))

________________________________________________________________________________________

Maxima [B]  time = 1.47068, size = 116, normalized size = 3.74 \begin{align*} -\frac{\frac{4 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}}{8 \, a} + \frac{2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} - \frac{\log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{2 \, a} + \frac{{\left (\frac{4 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - 1\right )}{\left (\cos \left (x\right ) + 1\right )}^{2}}{8 \, a \sin \left (x\right )^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^4/(a+a*csc(x)),x, algorithm="maxima")

[Out]

-1/8*(4*sin(x)/(cos(x) + 1) - sin(x)^2/(cos(x) + 1)^2)/a + 2*arctan(sin(x)/(cos(x) + 1))/a - 1/2*log(sin(x)/(c
os(x) + 1))/a + 1/8*(4*sin(x)/(cos(x) + 1) - 1)*(cos(x) + 1)^2/(a*sin(x)^2)

________________________________________________________________________________________

Fricas [B]  time = 0.500669, size = 204, normalized size = 6.58 \begin{align*} \frac{4 \, x \cos \left (x\right )^{2} +{\left (\cos \left (x\right )^{2} - 1\right )} \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) -{\left (\cos \left (x\right )^{2} - 1\right )} \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) - 4 \, \cos \left (x\right ) \sin \left (x\right ) - 4 \, x + 2 \, \cos \left (x\right )}{4 \,{\left (a \cos \left (x\right )^{2} - a\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^4/(a+a*csc(x)),x, algorithm="fricas")

[Out]

1/4*(4*x*cos(x)^2 + (cos(x)^2 - 1)*log(1/2*cos(x) + 1/2) - (cos(x)^2 - 1)*log(-1/2*cos(x) + 1/2) - 4*cos(x)*si
n(x) - 4*x + 2*cos(x))/(a*cos(x)^2 - a)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\cot ^{4}{\left (x \right )}}{\csc{\left (x \right )} + 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)**4/(a+a*csc(x)),x)

[Out]

Integral(cot(x)**4/(csc(x) + 1), x)/a

________________________________________________________________________________________

Giac [B]  time = 1.34284, size = 88, normalized size = 2.84 \begin{align*} \frac{x}{a} - \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right )}{2 \, a} + \frac{a \tan \left (\frac{1}{2} \, x\right )^{2} - 4 \, a \tan \left (\frac{1}{2} \, x\right )}{8 \, a^{2}} + \frac{6 \, \tan \left (\frac{1}{2} \, x\right )^{2} + 4 \, \tan \left (\frac{1}{2} \, x\right ) - 1}{8 \, a \tan \left (\frac{1}{2} \, x\right )^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)^4/(a+a*csc(x)),x, algorithm="giac")

[Out]

x/a - 1/2*log(abs(tan(1/2*x)))/a + 1/8*(a*tan(1/2*x)^2 - 4*a*tan(1/2*x))/a^2 + 1/8*(6*tan(1/2*x)^2 + 4*tan(1/2
*x) - 1)/(a*tan(1/2*x)^2)